//
//  HJJPlayerListCell.m
//  Pianke
//
//  Created by 黄俊杰 on 15/12/29.
//  Copyright © 2015年 dada. All rights reserved.
//

#import "HJJPlayerListCell.h"

@implementation HJJPlayerListCell




-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    return self;
}

-(void)createCell{

    self.playImage = [[UIImageView alloc] init];
    [self.contentView addSubview:self.playImage];
    self.playImage.image = nil;
    [self.playImage mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.top.bottom.mas_equalTo(0);
        make.right.mas_equalTo(self.playImage.mas_left).offset(5);
    }];
    
    self.titleLabel = [[UILabel alloc] init];
    self.titleLabel.font = MIDDLEFONT;
    self.titleLabel.textColor = WHITECOLOR;
    self.titleLabel.text = @"黄俊杰";
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(30);
        make.right.mas_equalTo(-20);
        make.top.mas_equalTo(10);
        make.bottom.mas_equalTo(self.titleLabel.mas_top).offset(15);
    }];
    
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.font = SMALLFONT;
    self.nameLabel.textColor = GRAYCOLOR;
    self.nameLabel.text = @"秦越";
    [self.contentView addSubview:self.nameLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(5);
        make.left.right.mas_equalTo(self.titleLabel);
        make.bottom.mas_equalTo(self.nameLabel.mas_top).offset(10);
    }];
}

-(void)sendModel:(HJJRadioRootModel *)model{

    self.titleLabel.text = model.title;
    self.nameLabel.text = model.uname;
}

@end
